<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分离构造器</title>
</head>
<body>

<div id="test"></div>

<script type="text/javascript">

    //常见写法
    var $$ = ajQuery = function(selector) {
        this.selector = selector;
        return this
    }
    ajQuery.fn = ajQuery.prototype = {
        selectorName:function(){
            return this.selector;
        },
        constructor: ajQuery
    }
    var a = new $$('aaa');  //实例化

    //得到选择器名字
    //aaa
    $("#test").html( a.selectorName() )


</script>
</body>
</html>